package com.yuang.library.net;


import com.yuang.library.base.BaseResponse;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import rx.Observable;

/**
 * Created by 杨光 on 2018/5/23
 * Describe : 通用的接口
 */

public interface CommonApis {
    //头像上传、单图上传
    @Multipart
    @POST("User/Avatar")
    Observable<BaseResponse<String>> Avatar(
            @Part MultipartBody.Part file
    );

    //多图上传
    @Multipart
    @POST("User/Avatara")
    Observable<BaseResponse<List<String>>> Avatara(
            @Part() List<MultipartBody.Part> file
    );

    //是否单方面关注判断
    @FormUrlEncoded
    @POST("Login/message")
    Observable<ResponseBody> my_att(
            @Field("uid") String uid,
            @Field("side") String side
    );

    //消息发送条数判断
    @FormUrlEncoded
    @POST("Login/message_count")
    Observable<ResponseBody> message_count(
            @Field("uid") String uid,
            @Field("side") String side
    );
}
